﻿using BussinessObject.ObjectTwo;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectHK3.ObjectTwo
{
    public partial class NewOrder : System.Web.UI.Page
    {
        B_LoadDrop ex = new B_LoadDrop();
        DataTable tb = new DataTable();
        protected void Page_Load(object sender, EventArgs e)
        {
       
            if (!IsPostBack)
            {
                Panel2.Visible = false;
                loadData();
            }
        }
        public void loadData()
        {        
            DropDownList1.DataSource = ex.city();
            DropDownList1.DataTextField = "CITY_NAME";
            DropDownList1.DataValueField = "CITY_ID";
            DropDownList1.DataBind();

            DropDownList2.DataSource = ex.city();
            DropDownList2.DataTextField = "CITY_NAME";
            DropDownList2.DataValueField = "CITY_ID";
            DropDownList2.DataBind();

            DropDownList4.DataSource = ex.service();
            DropDownList4.DataTextField = "SERVICE_NAME";
            DropDownList4.DataValueField = "SERVICE_ID";
            DropDownList4.DataBind();

            DropDownList5.DataSource = ex.Bran();
            DropDownList5.DataTextField = "BRANCH_NAME";
            DropDownList5.DataValueField = "BRANCH_ID";
            DropDownList5.DataBind();

            DropDownList6.DataSource = ex.Bran();
            DropDownList6.DataTextField = "BRANCH_NAME";
            DropDownList6.DataValueField = "BRANCH_ID";
            DropDownList6.DataBind();

            DropDownList7.DataSource = ex.service();
            DropDownList7.DataTextField = "SERVICE_NAME";
            DropDownList7.DataValueField = "SERVICE_ID";
            DropDownList7.DataBind();

            DropDownList8.DataSource = ex.Bran();
            DropDownList8.DataTextField = "BRANCH_NAME";
            DropDownList8.DataValueField = "BRANCH_ID";
            DropDownList8.DataBind();

            DropDownList9.DataSource = ex.Bran();
            DropDownList9.DataTextField = "BRANCH_NAME";
            DropDownList9.DataValueField = "BRANCH_ID";
            DropDownList9.DataBind();
        }
        protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (CheckBox1.Checked == true)
            {
                Panel1.Visible = false;
                Panel2.Visible = true;
            }
            else
            {
                Panel1.Visible = true;
                Panel2.Visible = false;
            }
        }
    }
}